<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<div class="panel-body">
    <%-- other table content here --%>
    <link href="${ctx }/static/css/product/goodsPhoto.css" rel="stylesheet" />
    <script type="text/javascript" src="${ctx }/static/jquery/ajaxfileupload.js"></script>
	<script type="text/javascript" src="${ctx }/static/js/product/goodsPhoto.js"></script>
	
	<div id="flashflashContent_" class="imgbar_wrap" style="position: relative;">
		<div id="sortable_" class="clearfix img_list img_list_ ui-sortable">
			<li draggable="false" class="first_icon" style="display: none;">
	            <i></i>
	        </li>
	        <c:forEach items="${goods.goodsPhotoList }" var="photo" varStatus="statu">
	        <c:choose>
					<c:when test="${fn:startsWith(photo.original, 'http')}">
						<c:set var="imgUrl" value="${photo.original }"/>
					</c:when>
					<c:otherwise>
						<c:set var="imgUrl" value="${ctx }${photo.original }"/>
					</c:otherwise>
			</c:choose>
	        <li style="display: list-item;" draggable="true" data-index="0" class="img_box">
				<div style="height:120px"><img height="100%"  src="${imgUrl }"></div>
				<div class="img_cover"></div>
				<div class="toolbar_wrap" style="display: none;">
				<div class="opacity"></div>
				<div class="toolbar">
				<c:if test="${param.type ne 'view' }">
				<a href="javascript:;" style="display:none;" class="edit"></a> <a href="javascript:;"
				 class="delete delete-image" fileid="${photo.id }" imgid="${statu.index +1}" fsimg="${photo.original }"></a>
				 </c:if>
				</div>
					<input type="hidden" name="goodsPhotos" value="${photo.original }" />
					<input type="hidden" name="goodsPhotoIds" value="${photo.id }" />
				</div>
			</li>
	        </c:forEach>
		</div>
		<!-- 
		<div class="delete-imgs"></div>
		 -->
		 <c:if test="${param.type ne 'view' }">
		<div class="upload_wrap">
			<div class="upload">
				<div class="localUpload_wrap">
					<div class="localTitle">上传电脑中图片</div>
					<div class="localUpload">
						<div class="imgUpload">
							<div id="filePicker_" style="position: relative; width: 100%; height: 100%; display: block;" class="webuploader-container">
							<div class="webuploader-pick"></div>
							<div id="file" style="display: block; height: 100%; width: 100%;">
							<input type="file" name="file" id="btnfile" class="webuploader-element-invisible" multiple="multiple" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png">
							<label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label>
							</div>
							</div>
						</div>
						<div style="display: none;" id="maxlength_cover"></div>
					</div>
				</div>
			</div>
		</div>
		</c:if>
	</div>
</div>